<%=packageName%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="hctrauma" />
        <title><g:message code="aei.studySearchResult.list.title" /></title>
    </head>
    <body>
        <div class="nav">
            <%--
            <span class="menuButton"><a class="home" href="\${resource(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="create" action="create">New ${className}</g:link></span>
            --%>
        </div>
        <div class="body">
            <h1><g:message code="aei.studySearchResult.list.title" /></h1>
            <g:if test="${flash.message}">
              <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                  <thead>
                    <tr><!--  TODO: i18n ! -->
                      <th><g:message code="studySearhcResult.label.id" /></th>
                      <th><g:message code="studySearhcResult.label.patientName" /></th>
                      <th><g:message code="studySearhcResult.label.studyDate" /></th>
                      <th><g:message code="studySearhcResult.label.modalities" /></th>
                      <th><g:message code="studySearhcResult.label.studyId" /></th>
                      <th><g:message code="studySearhcResult.label.series" /></th>
                      <th><g:message code="studySearhcResult.label.images" /></th>
                      <th><g:message code="studySearhcResult.label.source" /></th>
                      <th><g:message code="studySearhcResult.label.actions" /></th>
                    </tr>
                  </thead>
                  <tbody>
                  <g:each in="${results}" status="i" var="result">
                    <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                      <td>${result.id}</td>
                      <td>${result.patientName}</td>
                      <td>${result.studyDate}</td>
                      <td>${result.modalitiesInStudy}</td>
                      <td>${result.studyId}</td>
                      <td>${result.seriesNumber}</td>
                      <td>${result.imagesNumber}</td>
                      <td>${result.source.description}</td>
                      <td>
                        TODO
                      </td>
                    </tr>
                  </g:each>
                  </tbody>
                </table>
            </div>
        </div>
    </body>
</html>
